<?php
/**
 * @example
 * require_once '../requires.php';
 * 
 * $configs = array(
 * 	'smtp_subject' => 'hello, tom.wang',
 * 	'smtp_body' => '<b>happy every day</b>',
 * 	'smtp_to' => array('superlinyzu@qq.com', 'superlinyzu@163.com'), //发送多封邮件用数组，发送一封邮件用字符串
 * 	'smtp_attachments' => array('D:\AppServ\www\framework\Mail\example\attachment.jpeg'),
 * );
 * Mail::send($configs);
 */
require_once '../requires.php';

$cfg = array(
	'type' => 'smtp', //smtp sendmail mail
	
	'smtp_auth' => true,
	'smtp_ssl' => false,
	'smtp_host' => 'mailsz.achievo.com',
	'smtp_port' => '25',
	'smtp_user' => 'tom.wang',
	'smtp_pwd' => '**********',
	'smtp_keepalive' => false, //If this is set to true then to close the connection requires an explicit call to SmtpClose().
	'smtp_helo' => '', //Sets the SMTP HELO of the message (Default is $Hostname).
	'smtp_timeout' => 10,
	'smtp_debug' => false,
	
	'charset' => 'utf-8',
	'le' => "\n", //line ending
	'from' => 'tom.wang@achievo.com',
	'sender' 	=> 'tom.wang@achievo.com',
	'fromname' => 'tom.wang',
	'altbody' => 'Not Support Html',
	'priority' => 3, //1 = High, 3 = Normal, 5 = low
	'encoding' => '8bit', //8bit, 7bit, binary, base64, quoted-printable
	'html' => true,
	'bcc' => array(),
	'cc' => array(),
	
	'subject' => 'hello, tom.wang',
	'body' => '<b>happy every day</b>',
	'to' => array('superlinyzu@qq.com', 'tom.wang@achievo.com'),
	'attachments' => array('./attachment.jpeg'),
);
$ret = Mail::send($cfg);
var_dump($ret);
?>